package intopo.game.strategy;

/**
 * A class that represents a fixed point numerical strategy parameter. This
 * parameter is changeable. Any instance of class {@code Number} can be
 * used to set this parameter.
 */
public class FixedPointNumber
	extends AbstractStrategyParameter<Number>
{
	/**
	 * The fixed point numerical strategy parameter.
	 */
	private long value;

	/**
	 * Sole constructor.

	 * @param name The name of this strategy parameter.
	 * @param value The initial value of this strategy parameter.
	 */
	public FixedPointNumber (String name, long value)
	{
		super (name);
		this.value = value;
	}

	public Number getValue ()
	{
		return new Long (value);
	}

	public void setValue (long newValue)
	{
		value = newValue;
	}

	public void setValue (Number newValue)
	{
		value = newValue.longValue ();
	}
}

